package com.example.client.curator;

import com.example.client.ZKConstans;
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.CuratorFrameworkFactory;
import org.apache.curator.retry.ExponentialBackoffRetry;

/**
 * @author Creared by wangyang on 2019-01-28 18:36
 * email:techyang.wangy.@ymm56.com
 */
public class CreateSessionFluentSample {
    public static void main(String[] args) {

        CuratorFramework client = CuratorFrameworkFactory.builder()
                .connectString(ZKConstans.CONNECTOR_STRING)
                .sessionTimeoutMs(5000)
                .connectionTimeoutMs(3000)
                .retryPolicy(new ExponentialBackoffRetry(1000, 3))
                .build();
    }
}
